
import { createRouter, createWebHashHistory } from "vue-router"
import Login from '../components/Login.vue'
import Main from '../components/Main.vue'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            //路由路径 @RequestMapping相似
            path: '/',
            //跳转的组件
            component: Login
            //以上语句说明，当我们访问到'/login'路由时，就会跳转到Login组件，显示该vue页面
        },
        {
            //路由路径 @RequestMapping相似
            path: '/login',
            //跳转的组件
            component: Login
            //以上语句说明，当我们访问到'/login'路由时，就会跳转到Login组件，显示该vue页面
        }, {
            //路由路径
            path: '/main',
            //跳转的组件
            component:  Main
        }
    ]
})

export default router
